package cn.com.surker.system.dao;

import cn.com.surker.system.entity.SysUserPosition;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 员工职位表 Mapper 接口
 * </p>
 *
 * @author admin
 * @since 2022-10-05
 */
public interface SysUserPositionDao extends BaseMapper<SysUserPosition> {


    /**
     * 查询部门下是否存在该岗位
     * @param orgId
     * @param position
     * @param position1
     * @return
     */
    List<Map<String, Object>> hasGeneralManager(@Param("orgId") Long orgId, @Param("position") String position,
                                                @Param("position1") String position1);

    /**
     * 根据用户ID查询关联岗位信息
     * @param uid 用户ID
     * @return
     */
    List<SysUserPosition> queryByUid(Long uid);

    /**
     * 根据打卡记录及岗位
     * @param orgId
     * @param position
     * @param startTime
     * @return
     */
    List<Map<String, Object>> queryClockUser(Long orgId, String position, String startTime);

    /**
     * 查询是否包含总经理岗位
     * @param uid
     * @return
     */
    Integer findZjl(Long uid);
}
